import { createRouter, createWebHashHistory, createWebHistory,RouteRecordRaw } from 'vue-router';
import Main from '../views/Main.vue'
import Login from "../views/Login.vue";
import Register from "../views/Register.vue";
import Test from "../views/Test.vue";

const routes: RouteRecordRaw[] = [
    {
      path: '/',
      name:'Login',
      component: Login,
    },
    {
      path: '/register',
      name:'Register',
      component: Register,
    },
    {
      path: '/main/:username',  // /main/:username
      name:'Main',
      component: Main,
    },
    {
        path: '/test/:username',
        name:'Test',
        component: Test,
    }
  ];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;